package com.example.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;

import java.util.Date;


@TableName("operation_record")//当实体类和表名不一致的时候，用@tablename来指定表名
public class OperationRecord {
    @TableId(type = IdType.AUTO)
    private Long id;
    private Integer type;//1-货运单，2-派车单
    private Long orderId;
    private Integer taskType;//操作任务类型
    private Long operatorId;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date operateTime;
    private String location;
    private String unexpectedInfo;
    private Double unexpectedPrice;
    @TableField(exist = false)
    private String time;

    @TableField(exist = false)
    private String op;

    public OperationRecord() {
    }

    public OperationRecord(int type, Long order_id, int task_type, Long operate_id, Date operate_time) {
        this.type = type;
        this.orderId = order_id;
        this.taskType =task_type;
        this.operatorId = operate_id;
        this.operateTime = operate_time;
    }
    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public Long getOrderId() {
        return orderId;
    }

    public void setOrderId(Long orderId) {
        this.orderId = orderId;
    }

    public Integer getTaskType() {
        return taskType;
    }

    public void setTaskType(Integer taskType) {
        this.taskType = taskType;
    }

    public Long getOperatorId() {
        return operatorId;
    }

    public void setOperatorId(Long operatorId) {
        this.operatorId = operatorId;
    }

    public Date getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(Date operateTime) {
        this.operateTime = operateTime;
    }

    public String getLocation() {
        return location;
    }

    public void setLocation(String location) {
        this.location = location;
    }

    public String getUnexpectedInfo() {
        return unexpectedInfo;
    }

    public void setUnexpectedInfo(String unexpectedInfo) {
        this.unexpectedInfo = unexpectedInfo;
    }

    public Double getUnexpectedPrice() {
        return unexpectedPrice;
    }

    public void setUnexpectedPrice(Double unexpectedPrice) {
        this.unexpectedPrice = unexpectedPrice;
    }

    public String getTime() {
        return time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getOp() {
        return op;
    }

    public void setOp(String op) {
        this.op = op;
    }
}